/*
 * -------------------------------------------------------------------------------------------------------*
 * SBS Priceboard V2.0
 * Copyright (C) 2008 Unicom Vietnam JSC
 * -------------------------------------------------------------------------------------------------------* 
 * HeadURL: http://192.168.1.4/svn/priceboard/trunk/SBS_PriceboardV2/front-end/end-user/i_priceboard/
 * LastChangeBy: quanhm
 * LastChangeDate: Sep 5, 2008
 */
package com.unicom.priceboard.data.vo;

/**
 * Creation date: Sep 5, 2008
 * @author quan
 */
public class MarketTrackHCM {
	private String vnIndex_date;
	private int centerId;
	private int session;
	private int totalTrade;
	private double vn_Index;
	private double change;
	private double changed;
	private int vol;
	private int val;
	private int daySession;
	
	public MarketTrackHCM(HoIndex index) {
		String[] originalDate = index.getVnIndex_date().split("/");
		this.vnIndex_date = originalDate[2]+"-"+originalDate[1]+"-"+originalDate[0];
		this.centerId = 1;
		this.session = Integer.parseInt(index.getSession());
		this.daySession = index.getIdSession()==5?4:index.getIdSession();
		this.totalTrade = Integer.parseInt(index.getTotalTrade().replaceAll(",", ""));
		this.vn_Index = Double.parseDouble(index.getVnIndex().replaceAll(",", ""));
		this.change = Double.parseDouble(index.getChange());
		this.changed = Double.parseDouble(index.getChangePer());
	}
	
	/**
	 * @return the vnIndex_date
	 */
	public String getVnIndex_date() {
		return vnIndex_date;
	}
	/**
	 * @return the centerId
	 */
	public int getCenterId() {
		return centerId;
	}
	/**
	 * @return the session
	 */
	public int getSession() {
		return session;
	}
	/**
	 * @return the totalTrade
	 */
	public int getTotalTrade() {
		return totalTrade;
	}
	/**
	 * @return the vn_Index
	 */
	public double getVn_Index() {
		return vn_Index;
	}
	/**
	 * @return the change
	 */
	public double getChange() {
		return change;
	}
	/**
	 * @return the changed
	 */
	public double getChanged() {
		return changed;
	}
	/**
	 * @return the vol
	 */
	public int getVol() {
		return vol;
	}
	/**
	 * @return the val
	 */
	public int getVal() {
		return val;
	}
	/**
	 * @return the daySession
	 */
	public int getDaySession() {
		return daySession;
	}
	
	/**
	 * @param vnIndex_date the vnIndex_date to set
	 */
	public void setVnIndex_date(String vnIndex_date) {
		this.vnIndex_date = vnIndex_date;
	}
	/**
	 * @param centerId the centerId to set
	 */
	public void setCenterId(int centerId) {
		this.centerId = centerId;
	}
	/**
	 * @param session the session to set
	 */
	public void setSession(int session) {
		this.session = session;
	}
	/**
	 * @param totalTrade the totalTrade to set
	 */
	public void setTotalTrade(int totalTrade) {
		this.totalTrade = totalTrade;
	}
	/**
	 * @param vn_Index the vn_Index to set
	 */
	public void setVn_Index(double vn_Index) {
		this.vn_Index = vn_Index;
	}
	/**
	 * @param change the change to set
	 */
	public void setChange(double change) {
		this.change = change;
	}
	/**
	 * @param changed the changed to set
	 */
	public void setChanged(double changed) {
		this.changed = changed;
	}
	/**
	 * @param vol the vol to set
	 */
	public void setVol(int vol) {
		this.vol = vol;
	}
	/**
	 * @param val the val to set
	 */
	public void setVal(int val) {
		this.val = val;
	}
	/**
	 * @param daySession the daySession to set
	 */
	public void setDaySession(int daySession) {
		this.daySession = daySession;
	}
	
}
